places sidebar: Don't leak a reference
authorMatthias Clasen <mclasen@redhat.com>
Thu, 10 Nov 2016 20:16:05 +0000 (15:16 -0500)
committerMatthias Clasen <mclasen@redhat.com>
Thu, 10 Nov 2016 20:16:05 +0000 (15:16 -0500)
Pointed out in https://bugzilla.gnome.org/show_bug.cgi?id=774185

gtk/gtkplacessidebar.c

index 33b3ded42b1dc575df435adab38c1efb36ac5eee..46c65812b3ec2690301caa2630c39f7a85e9f7d0 100644 (file)
@@ -3484,15 +3484,15 @@ on_button_press_event (GtkWidget      *widget,
                 "section_type", &section_type,
                 NULL);
 
-  if (section_type != SECTION_BOOKMARKS)
-    return FALSE;
-
-  sidebar->drag_row = GTK_WIDGET (row);
-  sidebar->drag_row_x = (gint)event->x;
-  sidebar->drag_row_y = (gint)event->y;
+  if (section_type == SECTION_BOOKMARKS)
+    {
+      sidebar->drag_row = GTK_WIDGET (row);
+      sidebar->drag_row_x = (gint)event->x;
+      sidebar->drag_row_y = (gint)event->y;
 
-  sidebar->drag_root_x = event->x_root;
-  sidebar->drag_root_y = event->y_root;
+      sidebar->drag_root_x = event->x_root;
+      sidebar->drag_root_y = event->y_root;
+    }
 
   g_object_unref (sidebar);